package com.bloveoacom.weichi.login;

import android.os.Bundle;

import com.bloveoacom.base.BaseActivity;
import com.bloveoacom.util.ActivityUtil;
import com.bloveoacom.weichi.MainActivity;
import com.bloveoacom.weichi.activity.LoginActivity;

import java.util.concurrent.TimeUnit;

import io.reactivex.Observable;
import io.reactivex.functions.Consumer;

/**
 * author: zhu.px
 * e-mail: 1271901673@qq.com
 * time  : 2018/5/22
 * desc  : 启动页
 */
public class SplashActivity extends BaseActivity {


    @Override
    public int getLayoutResId() {
        return 0;
    }



    @Override
    public void initView() {

    }

    @Override
    public void initData() {
        addDispose(Observable
                .timer(1, TimeUnit.SECONDS)
                .subscribe(new Consumer<Long>() {
                    @Override
                    public void accept(Long aLong) throws Exception {
                        ActivityUtil.startActivity(mContext,MainActivity.class);
                        finish();
                    }
                }));
    }

    @Override
    public void getBundleExtras(Bundle extras) {

    }

    @Override
    public void initListener() {

    }


}
